package com.dfbz.demo;

import java.io.File;

/**
 * @author lscl
 * @version 1.0
 * @intro:
 */
public class Demo05_遍历目录 {
    public static void main(String[] args) {

        File file = new File("D:\\000");


        String[] fileNames = file.list();
        for (String fileName : fileNames) {
            System.out.println(fileName);
        }

        System.out.println("-------------");

        File[] files = file.listFiles();
        for (File tempFile : files) {
            System.out.println(tempFile);
        }


    }
}
